511fabfcf66e99104aa710049973ac18afb1de55,python/src/com/jetbrains/python/editor/PythonEnterHandler.java,PythonEnterHandler,canGenerateDocstring,#PsiElement#number#Document#,399
Before Change
// as complete docstring, because we can't understand that closing quotes actually belong to another docstring.
final String docstringIndent = PyIndentUtil.getLineIndent(document, document.getLineNumber(firstQuoteOffset));
for (String line : LineTokenizer.tokenizeIntoList(nodeText, false)) {
final String lineIndent = (String)PyIndentUtil.getLineIndent(line);
final String lineContent = line.substring(lineIndent.length());
if ((lineContent.startsWith("def ") || lineContent.startsWith("class ")) &&
docstringIndent.length() > lineIndent.length() && docstringIndent.startsWith(lineIndent)) {
After Change
// as complete docstring, because we can't understand that closing quotes actually belong to another docstring.
final String docstringIndent = PyIndentUtil.getLineIndent(document, document.getLineNumber(firstQuoteOffset));
for (String line : LineTokenizer.tokenizeIntoList(nodeText, false)) {
final String lineIndent = PyIndentUtil.getLineIndent(line);
final String lineContent = line.substring(lineIndent.length());
if ((lineContent.startsWith("def ") || lineContent.startsWith("class ")) &&
docstringIndent.length() > lineIndent.length() && docstringIndent.startsWith(lineIndent)) {